package cn.kgc.Adjudicative.service.impl;

import cn.kgc.Adjudicative.entity.DPermission;
import cn.kgc.Adjudicative.mapper.DPermissionMapper;
import cn.kgc.Adjudicative.service.DPermissionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Set;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author sun
 * @since 2023-01-05
 */
@Service
public class DPermissionServiceImpl extends ServiceImpl<DPermissionMapper, DPermission> implements DPermissionService {

    @Autowired
    private DPermissionMapper permissionMapper;

    @Override
    public Set<String> getAllPermissionByUsername(String username) {
        return permissionMapper.selectAllPermissionCodeByUsername(username);
    }
}
